package com.david.func_test.retrofitinterface

import com.david.http.http.MyRetrofitHelper
import com.david.http.http.response.BaseResult
import kotlinx.coroutines.flow.Flow
import retrofit2.http.GET

val testInterface = MyRetrofitHelper.create(ITestInterface::class.java)
interface ITestInterface {
    @GET("/resources/json/news.json")
    fun getNewsList(): Flow<BaseResult<List<NewsItem>>>

    @GET("/resources/json/newsdetail.json")
    fun getNewsDetail(): Flow<BaseResult<List<NewsItem>>>
}

data class BookBean(
    var name:String,
    var url:String,
)


data class NewsItem(
    var title: String,
    var content: String,
    var imgUrl: String,
)